import os
from loguru import logger
from concurrent.futures import ThreadPoolExecutor

base_dir = os.getcwd()

folder_name = "/files"
config_path = base_dir + folder_name

video_folder_path = config_path + "/video"
imag_folder_path = config_path + "/imags"

map3_folder_path = f"{config_path}/mp3"
wav_folder_path = f"{config_path}/wav"

objectPoolSize = ocrSize = 1
asrPollSize = 1
ttsPollSize = 1
ThreadSize = 4

ThreadPool = ThreadPoolExecutor(max_workers=ThreadSize)

logger = logger

rec_model_dir = ""
cls_model_dir = ""
det = "..\\ocr_model\\ch_ppocr_server_v2.0_det_infer"
rec = "..\\ocr_model\\\ch_ppocr_mobile_v2.0_rec_infer"

if not os.path.exists(config_path):
    os.makedirs(config_path, exist_ok=True)
if not os.path.exists(video_folder_path):
    os.makedirs(video_folder_path, exist_ok=True)
if not os.path.exists(imag_folder_path):
    os.makedirs(imag_folder_path, exist_ok=True)

if not os.path.exists(map3_folder_path):
    os.makedirs(map3_folder_path, exist_ok=True)
if not os.path.exists(wav_folder_path):
    os.makedirs(wav_folder_path, exist_ok=True)
